﻿	
using System;
using Conference.Core.Sal.DataContracts;
using Conference.Core.Sal.DataRequests;
using Conference.Core.Sal.DataResponses;
using Conference.Server.DL;

namespace Conference.Server.Synchronization
{
    public class SyncSessionSpeaker : SyncEntityObject<
        SessionSpeakerDataContract, 
        SessionSpeakerDataResponse, 
        SessionSpeakerDataRequest,
        SessionSpeaker>
    {
        public SyncSessionSpeaker() 
            : base("SessionSpeakers")
        {
        }

		protected override SessionSpeakerDataContract FromDatabase(SessionSpeaker item)
        {
            return new SessionSpeakerDataContract()
                {
					Id = item.Id, 
					Created = item.Created, 
					CreatedBy = item.CreatedBy, 
					Modified = item.Modified, 
					ModifiedBy = item.ModifiedBy, 
					SpeakerId = item.SpeakerId, 
					SessionId = item.SessionId, 
		
                };
        }

        protected override void FromService(SessionSpeakerDataContract item, SessionSpeaker entity)
        {
			entity.Id = item.Id; 
			entity.Created = item.Created; 
			entity.CreatedBy = item.CreatedBy; 
			entity.Modified = item.Modified; 
			entity.ModifiedBy = item.ModifiedBy; 
			entity.SpeakerId = item.SpeakerId; 
			entity.SessionId = item.SessionId; 
		
		}
	}
}

